import { GlobalClass } from "../../../../com/mui/core/GlobalClass";
import { FilterConst } from "../../../component/gconst/FilterConst";
//class SkillAutoUseIcon
    
    export  class SkillAutoUseIcon /* flash.display.Sprite */
    {
        constructor()
        {
            
            this._autoUseIcon = new Object /* flash.display.Bitmap */();
            addChild(this._autoUseIcon);
            mouseChildren = false;
            buttonMode = true;
            addEventListener(flash.events.MouseEvent.MOUSE_OVER, this.onMouseOverHandler);
            return;
        }

        public updateIcon(arg1: string): void
        {
            this._autoUseIcon.bitmapData = GlobalClass.getBitmapData(arg1);
            return;
        }

        public set useAble(arg1: Boolean)
        {
            this._useAble = arg1;
            if (arg1) 
            {
                this._autoUseIcon.filters = null;
            }
            else 
            {
                this._autoUseIcon.filters = [FilterConst.colorFilter2];
            }
            return;
        }

        /* internal  */onMouseOverHandler(arg1: Object /* flash.events.MouseEvent */): void
        {
            addEventListener(flash.events.MouseEvent.MOUSE_OUT, this.onMouseOutHandler);
            --y;
            return;
        }

        /* internal  */onMouseOutHandler(arg1: Object /* flash.events.MouseEvent */): void
        {
            removeEventListener(flash.events.MouseEvent.MOUSE_OUT, this.onMouseOutHandler);
            y = y + 1;
            return;
        }

        protected /* var */_autoUseIcon: Object /* flash.display.Bitmap */;

        protected /* var */_useAble: Boolean;
    }
